package com.jfinal.weixin.model;

import com.jfinal.plugin.activerecord.Model;

import java.util.List;

/**
 * Created by gongi on 16/6/12.
 */
public class TreeHoleComment extends Model<TreeHoleComment> {

    public static final TreeHoleComment dao = new TreeHoleComment();

    public TreeHoleComment getCommentById(int id) {
        return TreeHoleComment.super.findById(id);
    }

    public List<TreeHoleComment> getCommentByArticleId(int id) {
        String sql = "select * from treehole_comment where articleid = ?";
        return dao.find(sql, new Object[]{id});
    }
}
